home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / SCIENTIF / 0830.ZIP / SPECTRUM.DOC < prev    next >
Text File  |  1987-11-02  |  17KB  |  293 lines

  1. General Program Description
  2.  
  3.      Included on this disk are the following spectral analysis programs: 
  4. GAMMA.COM, ENRAD.COM, ALPHA.COM, and XRAY.COM.
  5.  
  6.      GAMMA and ENRAD are programs to display gamma emission spectral data.  
  7. ALPHA is intended to display alpha emission spectral data.  XRAY can display 
  8. x-ray diffraction pattern spectral data.  Sample spectra are included on this 
  9. disk.  These programs will display spectral data on the hi-resolution color 
  10. graphics screen and allow the user to examine it.  He/she can expand or 
  11. contract the spectrum and print it by using a print screen utility.  Selected 
  12. areas of the spectrum can be integrated, and peaks in a gamma or alpha 
  13. spectrum can be identified by comparison with an isotope library.  Any program 
  14. is started by typing the following command to the DOS: 
  15.    
  16.        command [filespec]
  17.  
  18. where command is either GAMMA, ENRAD, ALPHA, or XRAY; and where [filespec] is 
  19. a spectral file.  If the filespec is not included on the command line, then 
  20. the program will prompt the user to supply one.  Drive and path may be 
  21. included.  The spectral file must be in a particular format in order for the 
  22. program to properly read it (see section on file format).  The program then 
  23. reads the spectral file if it exists; if not, it will ask the user to supply 
  24. an existing filespec. 
  25.  
  26.  
  27. Program Operation
  28.  
  29.      Let's explore the operation of one of the spectral analysis programs by 
  30. looking at one of the sample spectra provided on the disk.  Type the following 
  31. command to get started: 
  32.  
  33.      ENRAD corew4.ccs
  34.  
  35. We will start with the ENRAD program (ENRAD stands for environmental 
  36. radiation).  Corew4.ccs is a gamma spectrum of a sediment core taken from the 
  37. bottom of the Calcasieu Lake in southwest Louisiana.  We expect to see only 
  38. naturally occurring gamma emitters, so we choose to use the ENRAD program.  
  39. ENRAD will read this spectral file.
  40.      Next, the program will read in the isotope library file. (At this time, 
  41. XRAY does not include any kind of library file.)  This file must be present on 
  42. the default drive.  These files contain isotopic information which the program 
  43. uses to identify peaks in the gamma or alpha spectra.  (See section on Isotope 
  44. Libraries for a description of these files.) 
  45.      Next, the program searches for a file containing the detector geometry 
  46. coefficients.  This file is called COEFFS.TXT.  It currently contains five 
  47. geometries (see section on coefficients file).
  48.      Next, the program will search the default drive for a file which has the 
  49. same filename and an extension of .CFG.  This file contains answers to the 
  50. questions asked by the program concerning whether or not to connect the dots 
  51. making up the spectral plot, and vertical scaling of the data.  If this file 
  52. is not present, the program prompts the user for this information.  The 
  53. questions asked are: 
  54.      "Connect dots? (Y/N)".  Type Y or N in response to this question.  
  55.      "Logarithmic plot? (Y/N)".  If the answer is Y, the program will scale 
  56. the data and display the spectrum.  If the answer is N, the program will ask 
  57. the user to input a scaling factor.  If the user just presses RETURN or enters 
  58. a zero, then the data will be scaled so that the largest value in the spectrum 
  59. will appear full scale on the graphic plot.  Choosing a smaller value will 
  60. result in expansion of the y÷axis.  After the data is scaled, the spectrum is 
  61. displayed on the graphic screen and the user can begin to examine it.
  62.      We should see the dots not connected and a logarithmic plot.  The 
  63. vertical line near the middle of the screen is the graphic cursor.  It can be 
  64. moved by pressing the left and right arrow keys.  It can be moved faster by 
  65. holding down the control key and pressing the arrow keys.  As the cursor is 
  66. moved, its position is constantly updated on a status line near the bottom of 
  67. the screen.  The cursor's channel number is shown.  This is its position 
  68. within the spectral file.  For this particular spectrum, there are 1024 
  69. channels.  The energy corresponding to this channel is calculated and shown 
  70. (in units of kilo electron volts) if this spectrum has been calibrated.  This 
  71. calibration data is stored along with the spectrum.  Finally, the counts in 
  72. this channel are shown. 
  73.      The graphic screen is a window through which we are looking at the 
  74. spectrum.  To move the window to the right, press the PgUp key.  To move the 
  75. window to the left, press the PgDn key.  Look at the help screen by pressing 
  76. the / or ? key.  When you are ready to quit the program, press control-Q.  The 
  77. program will return to the DOS.  A description of the function keys is given 
  78. below. 
  79.  
  80.      F1 LEFT Pressing the F1 key will place a marker on the left side of a 
  81. region of interest.
  82.      F2 RIGHT Pressing the F2 key will place a marker on the right side of a 
  83. region of interest.
  84.      (Any time both LEFT and RIGHT marks are placed on a region of interest, 
  85. this spectral region will be integrated and the results shown on a status line 
  86. near the bottom of the screen.  Shown are the LEFT and RIGHT channels, the 
  87. gross area and the net area.  The net area is calculated by drawing a baseline 
  88. from the left to the right mark, and subtracting the area below the baseline 
  89. from the gross area.) 
  90.      F3 EXPAND Pressing the F3 key will expand the display.  The channel under 
  91. the cursor will try to stay near the middle of the graphic screen. 
  92.      F4 CONTRACT Pressing the F4 key will contract the display.  The channel 
  93. under the cursor will try to stay near the middle of the graphic screen. 
  94.      F5 IDENT Pressing the F5 key will cause the program to search through
  95. the library, trying to find a match for the energy under the cursor.  At the 
  96. end of the search, the number of matches will be displayed near the bottom of 
  97. the screen. 
  98.      F6 RESULT Pressing the F6 key will display the results of the most 
  99. recent search.  Examine one of the library entries by typing its number, or 
  100. return to the display by pressing RETURN.  If you type a valid number, then 
  101. you are presented with all of the isotope's data stored in the library.  Also 
  102. shown is the mass of the sample and geometry.  The detector efficiency and 
  103. amount of isotope in the sample are calculated and shown.  You now have the 
  104. option of printing this information on the printer, if desired, press Y, 
  105. otherwise press N or RETURN.  The isotope amount is calculated using one of 
  106. the following equations:
  107.  
  108. pCi/g =            Net.area x  1 x 1012                              (Eq. 1)
  109.          Live x Det.eff x t.p x 3.7 x 1010 x mass
  110.  
  111.      Net.area is the net area of the spectral region, 1 x 1012 is the 
  112. number of pico units, Live is the live time in seconds, Det.eff is the 
  113. detector efficiency, t.p is the transition probability, 3.7 x 1010 is the 
  114. number of disintegrations per Curie, and mass is the sample mass in grams.
  115.  
  116. ppm =         Net.area/Live x At.wt x 1 x 106                        (Eq. 2)
  117.        Ab x t.p x Det.eff x flux x mass x c.s x Avog x irr x cool
  118.  
  119.      Net.area is the net area of the spectral region, Live is the live time in 
  120. seconds, At.wt is the atomic weight in grams per mole, 1 x 106 is the number 
  121. of parts in one million, Ab is the isotopic abundance, t.p is the transition 
  122. probability, Det.eff is the detector efficiency, flux is the neutron flux in 
  123. neutrons per cm2 per second, mass is sample mass in grams, c.s is the cross 
  124. section in barns, Avog is Avogadro's number, irr is the activation factor, and 
  125. cool is the decay factor:
  126.  
  127.    irr = (1-(exp(-(ln(2)/HalfLife) x lenirr )))        (activation factor)
  128.      HalfLife and lenirr (length of irradiation) are in hours,
  129.    cool = (exp(-(ln(2)/HalfLife) x cooltime x 24 ))    (decay factor)
  130.      HalfLife is in hours and cooltime is in days.
  131.    
  132.      The isotopic amounts for naturally occurring isotopes are calculated 
  133. using equation 1 (in programs ENRAD and ALPHA), while isotopes from thermal 
  134. neutron activated samples are calculated using equation 2 (in the program 
  135. GAMMA). 
  136.  
  137.      F8 SCALE Pressing the F8 key will allow changing the plot parameters, 
  138. such as connected dots and vertical scale. 
  139.      F9 -MORE- Pressing the F9 key will present a second set of functions.
  140.  
  141.      F1 ENERGY Pressing the F1 key will display the energy calibration factors 
  142. near the bottom of the screen.  These are the channel zero energy and the 
  143. energy per channel.  Both are in units of kev. 
  144.      F2 TIME Pressing the F2 key will display the count times near the bottom 
  145. of the screen.  These are clock and live times in seconds.  The percent dead 
  146. time is calculated from these times. 
  147.      F3 MEMORY Pressing the F3 key will display the available memory.
  148.      F4 HEADING Pressing the F4 key will display the heading information that 
  149. is stored along with the spectral file. 
  150.      F5 DETEFF Pressing the F5 key will cause the program to plot the 
  151. efficiency curves for the various detector geometries that are currently 
  152. defined.
  153.      F6 SAVE Pressing the F6 key will cause the program to write the entire 
  154. spectral file back to disk.  This is useful if the spectrum is recalibrated 
  155. and then the user wishes to store the new calibration coefficients.
  156.      F7 CALIB Pressing the F7 key will allow the user to recalibrate the 
  157. spectrum.  The program will prompt the user with instructions printed near the 
  158. bottom of the screen.  First, move the cursor to a peak of known energy, press 
  159. the RETURN key, and enter the energy (in kev).  Then, move the cursor to a 
  160. second peak of known energy, press the RETURN key, and enter the energy (in 
  161. kev).  The program will calculate the channel zero energy and the energy per 
  162. channel and display them near the bottom of the screen.  These new 
  163. coefficients can be stored with the spectrum by pressing the F6 SAVE key. 
  164.      F8 LOAD Pressing the F8 key will cause the program to prompt the user for 
  165. another file name.  This spectral file will be loaded and displayed.
  166.      F9 -MORE- Pressing the F9 key will present the first set of functions.
  167.  
  168.  
  169. Coefficients File
  170.  
  171.      The file called COEFFS.TXT contains the detector geometry coefficients.  
  172. The format of the file is described as follows.  The first line of the file 
  173. contains the number of geometries in the file.  Each geometry is given:
  174.  A)  two coefficients, called a and b.  These coefficients are used to 
  175.      determine the detector efficiency at any given energy by solving this 
  176.      equation: 
  177.  
  178.           Det.Eff. = a * energyb
  179.  
  180.      (**NOTE** This equation gives erroneous efficiencies for energies below 
  181.      about 100 kev.)  These coefficients can be determined by counting a 
  182.      radioactive standard (available from the National Bureau of Standards), 
  183.      and plotting the ratio of detected activity to known activity versus 
  184.      energy.  This data can be fitted to the above equation using a least 
  185.      squares method.  This method is carried out for each detector geometry 
  186.      used, and the data is put into the coefficients file. 
  187.  B)  the title, or name, of the geometry.  This is usually a number, 1, 2, 
  188.      etc., for each geometry used.
  189.  
  190.  
  191. Configuration File 
  192.  
  193.      A configuration file can be created to avoid having to answer the plot 
  194. questions every time a spectral analysis program is run.  If this file is 
  195. present on the default drive, then the program will take answers to the plot 
  196. questions from this file.  The configuration file should contain two or three 
  197. pieces of information.  The first character should be Y or N, and is the 
  198. answer to the question "Connect dots? (Y/N)".  The second character is also 
  199. either Y or N, and is the answer to the question "Logarithmic plot? (Y/N)".  
  200. If the second character is Y (which means that log plot is selected), then 
  201. that is all the configuration file needs to contain.  If the second character 
  202. is N (which means that log plot is not selected), then a numeric value will 
  203. have to be provided.  To cause the spectral analysis program to always scale 
  204. the spectrum to the largest value, enter a zero here; otherwise, any non-zero 
  205. value can be entered.  The simplest method of creating a configuration file is 
  206. illustrated here: (user input is italicized; <CR> means to press the RETURN 
  207. key) 
  208.  
  209.                                         Comments
  210.      A>copy con gamma.cfg <CR>  copy from console to configuration file
  211.        NN0<F6>  <CR>            <F6> means press the F6 key
  212.          1 File(s) copied         response from DOS
  213.  
  214.  
  215. Spectrum Acquisition
  216.  
  217.      The spectrum will have to be acquired from a multi-channel analyzer or 
  218. similar instrument, and then processed into the particular format required by 
  219. the analysis program.  The program called ACQUIRE3.BAS is a program written in 
  220. BASIC which was designed to operate with a model 5400 multi-channel analyzer 
  221. built by Norland/Ino-Tech, using a serial interface.  It will ask for some 
  222. heading information to be stored along with the spectrum, and then will 
  223. display some instructions before acquiring the spectrum.  This program is very 
  224. picky and probably will have to be modified to work with other equipment.  But 
  225. it should give a rough idea on how to write a program to acquire and process a 
  226. spectrum. 
  227.  
  228.  
  229. Spectral File Format 
  230.  
  231.      The spectral file must be in a particular format in order for the 
  232. programs GAMMA, ENRAD, and ALPHA to read them properly.  The program XRAY has 
  233. slightly different file format requirements.  In the following, the string 
  234. called "miscellaneous" will be printed on the top line of the graphic screen.  
  235. Usually the title of the spectrum is put here.  
  236.      For the GAMMA, ENRAD, and ALPHA programs the format is as follows: 
  237.  
  238.    Name of variable           variable type        description               
  239.      irrdate                    string[80]      date of irradiation
  240.      irrtime                    string[80]      time of irradiation
  241.      colldate                   string[80]      date of collection
  242.      colltime                   string[80]      time of collection
  243.      misc                       string[80]      miscellaneous
  244.      flux                       real            neutron flux in units of
  245.                                              neutrons per cm2 per second
  246.      mass                       real            sample mass in grams
  247.      geom                       integer         detector geometry
  248.      lenirr                     real            length of irradiation in hours
  249.      cooltime                   real            cooling time in days
  250.      chzen                      real            channel zero energy in kev
  251.      ench                       real            energy per channel in kev
  252.      numchan                    integer         number of channels in spectrum
  253.      clock                      real            clock time in seconds
  254.      live                       real            live time in seconds
  255.      counts                     real            counts in channels 2 through 
  256.                                               numchan.  Channels 0 and 1 are 
  257.                                               assumed to contain the clock and 
  258.                                               live times, respectively. 
  259.      <EOF>                                      end of file.
  260.  
  261.  
  262.      The following file format applies to the program XRAY.COM:
  263.  
  264.    Name of variable           variable type        description               
  265.      misc                       string[80]      miscellaneous
  266.      startang                   real            starting angle of scan
  267.      endang                     real            ending angle of scan
  268.      angincr                    real            angle increment
  269.      CTime                      integer         count time in seconds
  270.      ...
  271.      numchan                    integer         number of channels
  272.      counts                     real            counts in channels 1 through 
  273.                                               numchan
  274.      <EOF>                                      end of file.   
  275.      
  276.  
  277. Isotope Libraries
  278.  
  279.      Three isotope libraries are included.  They are NTHERM2.TXT, ENRAD2.TXT, 
  280. and NATALP2.TXT.  They include information such as atomic number and atomic 
  281. mass of isotopes, cross section and abundance of parents, and emission 
  282. energies and transition probabilities.  Up to 24 energies and transition 
  283. probabilities are included with each isotope.  This data has been collected 
  284. from General Electric Nuclide Chart. 
  285.      The library NTHERM2.TXT contains isotopes which are produced by thermal 
  286. neutron irradiation. 
  287.      The library ENRAD2.TXT contains isotopes which are naturally occurring 
  288. gamma emitters.  The isotopes are products of the uranium and thorium decay 
  289. chains. 
  290.      The library NATALP2.TXT contains isotopes which are naturally occurring 
  291. alpha particle emitters.
  292.  
  293.